package com.winshare.saleAssistant.mapper;

import com.winshare.saleAssistant.domain.dto.req.AppCreateDTO;
import com.winshare.saleAssistant.domain.dto.req.AppMenuUpdateDTO;
import com.winshare.saleAssistant.domain.dto.req.AppUpdateDTO;
import com.winshare.saleAssistant.domain.dto.req.BaseIdDTO;
import com.winshare.saleAssistant.domain.dto.resp.AppRespDTO;
import com.winshare.saleAssistant.domain.entity.AppDO;
import com.winshare.saleAssistant.domain.entity.AppMenuDO;
import org.mapstruct.Mapper;
import org.mapstruct.ReportingPolicy;
import org.mapstruct.factory.Mappers;

import java.util.List;

@Mapper(unmappedTargetPolicy = ReportingPolicy.IGNORE)
public interface AppMapStruct {

    AppMapStruct INSTANCE = Mappers.getMapper(AppMapStruct.class);
    
    AppDO fromAppCreateDTO(AppCreateDTO appCreateDTO);

    AppDO fromAppUpdateDTO(AppUpdateDTO appUpdateDTO);

    AppRespDTO fromAppDO(AppDO appDO);

    List<AppRespDTO> fromAppDOList(List<AppDO> appDOList);

    AppDO fromBaseIdDTO(BaseIdDTO baseIdDTO);

    AppMenuDO fromAppMenuUpdateDTO(AppMenuUpdateDTO appMenuUpdateDTO);
}
